#ifndef KERNELANALYSISIMAGE_H
#define KERNELANALYSISIMAGE_H
#include<QImage>
#include<cmath>
#include<algorithm>
#include"geolayer.h"

class kernelAnalysisImage
{
public:
    kernelAnalysisImage();
    kernelAnalysisImage(geoLayer*,QString);
    bool saveOutPut();
    double getDistance(QPointF pt1,QPointF pt2);
    void getMinMax();
    double getMedianDistance();
    double getStandardDistance();
    void getDensity();
private:
    QString savePath;
    QPointF meanCenter;//点要素平均中心
    double medianDistance;//距离中值
    double standardDistance;//标准距离
    double searchRadius;//搜索带宽
    QVector<QVector<double>> densities;//核密度
    double maxDensity,minDensity;
    double gridSize;//格网大小
    int imageSize;//图像大小（以像素为单位）
    double minX, maxX, minY, maxY;//图层中极值坐标
    geoLayer *layer;
    QVector<double>distances;//各点距平均中心的距离
};

#endif // KERNELANALYSISIMAGE_H
